home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Communication / NewsBase / Source / common.subproj / InfoD.h < prev    next >
Text File  |  1993-01-12  |  2KB  |  69 lines

  1. /*$Copyright:
  2.  * Copyright (C) 1992.5.22. Recruit Co.,Ltd. 
  3.  * Institute for Supercomputing Research
  4.  * All rights reserved.
  5.  * NewsBase  by ISR, Kazuto MIYAI, Gary ARAKAKI, Katsunori SUZUKI, Kok-meng Lue
  6.  *
  7.  * You may freely copy, distribute and reuse the code in this program under 
  8.  * following conditions.
  9.  * - to include this notice in the source code, if it is to be distributed 
  10.  *   with source code.
  11.  * - to add the file named "COPYING" within the code, which shall include 
  12.  *   GNU GENERAL PUBLIC LICENSE(*).
  13.  * - to display an acknowledgement in binary code as follows: "This product
  14.  *   includes software developed by Recruit Co.,Ltd., ISR."
  15.  * - to display a notice which shall state that the users may freely copy,
  16.  *   distribute and reuse the code in this program under GNU GENERAL PUBLIC
  17.  *   LICENSE(*)
  18.  * - to indicate the way to access the copy of GNU GENERAL PUBLIC LICENSE(*)
  19.  *
  20.  *   (*)GNU GENERAL PUBLIC LICENSE is stored in the file named COPYING
  21.  * 
  22.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  23.  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  24.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  25. $*/
  26. /* InfoD.h */
  27.  
  28. #import <objc/HashTable.h>
  29.  
  30. @interface InfoD:HashTable
  31. {
  32.     const char *key;
  33.     NXZone *zone;
  34. }
  35. - initWithKey:(const char *)key strCapacity:(int)kstr_num
  36.                           intCapacity:(int)kint_num;
  37. - initWithKey:(const char *)key;
  38.  
  39. - addInfo:(char *)kvalue key:(char *)key;
  40. - addInfoString:(const char *)kvalue key:(const char *)key;
  41. /*
  42.  *  add data to class
  43.  *    kvalue: value of field( miyai@isr.recruit.co.jp, fj.sys.next... )
  44.  *    key:    field name( e.g. From, Data, Newsgroups.... )
  45.  */
  46.  
  47. - addInfoInt:(int)kvalue key:(char *)key;
  48.  
  49. - (void *)infoForKey:(const char *)key;
  50. /*
  51.  *  return contents of element specified by the key of "key"
  52.  *    key:    field name
  53.  *    return:    istrCount
  54.  */
  55.  
  56. - setHeaderInfo:(char *)kheader;
  57.  
  58. - (BOOL)readFromStream:(NXStream *)stream;
  59.  
  60. - (BOOL)readFromTarStream:(NXStream *)stream;
  61.  
  62. - (BOOL)readFromFile:(const char *)pathName;
  63.  
  64. - (void)writeToStream:(NXStream *)stream;
  65.  
  66. - (void)writeToTarStream:(NXStream *)stream;
  67.  
  68. @end
  69.